<?php
$this->breadcrumbs = array (
		'Jogadores' 
);

$team = Team::model ()->findByAttributes ( array (
		'owner_id' => $_SESSION ['owner']->id 
) );
if ($team != null) {
	if ($_SESSION ['user']->username != 'admin') {
		$this->menu = array (
				array (
						'label' => 'Inserir Jogador',
						'url' => array (
								'create',
								'team_id' => $team->id,
								'return_url' => '/team/view/' . $team->id 
						),
						'visible' => ($team != null && $team->status === 'ATIVO') 
				) 
		);
	}
}
?>

<h1 align="center">Jogadores</h1>

<?php

$this->widget ( 'bootstrap.widgets.TbListView', array (
		'dataProvider' => $dataProvider,
		'itemView' => '_view' 
) );
?>
